Skip to content

Fix JTC test speed scaling publisher (backport #2153)#2162

Merged
christophfroehlich merged 1 commit intokiltedfrom
mergify/bp/kilted/pr-2153
Feb 10, 2026
Merged

Fix JTC test speed scaling publisher (backport #2153)#2162
christophfroehlich merged 1 commit intokiltedfrom
mergify/bp/kilted/pr-2153

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Feb 10, 2026

I'm working on adding a test to the JTC but when running master locally it fails on my machine. I use CycloneDDS in my setup so that is likely why CI is passing (because FastDDS isn't enforcing this) but the output from the failure pointed to an easy fix.

When I run locally you can see the test publisher to /test_joint_trajectory_controller/speed_scaling_input has the wrong QoS settings...

3: [test_joint_trajectory_controller 1770662071.626853898]: Setting initial scaling factor to 0.123000
3: [test_joint_trajectory_controller 1770662071.626858865]: Using scaling state from the hardware from interface speed_scaling/speed_scaling_factor.
3: [test_joint_trajectory_controller 1770662071.627182014]: New publisher discovered on topic '/test_joint_trajectory_controller/speed_scaling_input', offering incompatible QoS. No messages will be sent to it. Last incompatible policy: DURABILITY_QOS_POLICY
3: /root/control_ws/src/ros2_controllers/joint_trajectory_controller/test/test_trajectory_controller.cpp:2835: Failure
3: Expected equality of these values:
3:   state->speed_scaling_factor
3:     Which is: 0.123
3:   0.765
3: 
3: [  FAILED  ] TrajectoryControllerTest.scaling_command_interface_sets_value (832 ms)
-------
3: [  FAILED  ] 2 tests, listed below:
3: [  FAILED  ] TrajectoryControllerTest.setting_scaling_factor_works_correctly
3: [  FAILED  ] TrajectoryControllerTest.scaling_command_interface_sets_value

because using rclcpp::SystemDefaultsQoS() lets the underlying RMW choose the settings, which almost always defaults to Volatile.

To fix this I set the publisher to Transient Local durability to ensure it doesn't miss the value changes published in the test.


This is an automatic backport of pull request #2153 done by [Mergify](https://mergify.com).

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.15%. Comparing base (dae02b4) to head (8d39ae9).
⚠️ Report is 1 commits behind head on kilted.

Additional details and impacted files
@@           Coverage Diff           @@
##           kilted    #2162   +/-   ##
=======================================
  Coverage   85.15%   85.15%           
=======================================
  Files         151      151           
  Lines       14566    14569    +3     
  Branches     1260     1260           
=======================================
+ Hits        12403    12406    +3     
  Misses       1716     1716           
  Partials      447      447           
Flag Coverage Δ
unittests 85.15% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ory_controller/test/test_trajectory_controller.cpp 99.80% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christophfroehlich christophfroehlich merged commit 4700282 into kilted Feb 10, 2026
14 checks passed
@christophfroehlich christophfroehlich deleted the mergify/bp/kilted/pr-2153 branch February 10, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants